package com.cxc.mp.simple.web;

import lombok.extern.slf4j.Slf4j;
import org.springframework.util.StopWatch;

import java.util.stream.IntStream;

@Slf4j
public class Demo {


//    @GetMapping("/testPerformance")
    public void testPerformance(){
        StopWatch stopWatch = new StopWatch();
        stopWatch.start();
        IntStream.rangeClosed(1, 500).forEach(val ->{
            log.info("{}, {}", val, "write log" + val);
        });
        stopWatch.stop();


        log.info("result {} ", stopWatch.prettyPrint());
    }

}
